package ${package.Service};

import ${package.Entity}.dto.${entity}DTO;
import ${package.Entity}.${entity};
import com.baomidou.mybatisplus.core.metadata.IPage;
import ${superServiceClassPackage};
import com.ctsi.hndx.common.BasePageForm;
import java.util.List;

/**
 * <p>
 * ${table.comment!} 服务类
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
<#if kotlin>
interface ${table.serviceName} : ${superServiceClass}<${entity}>
<#else>
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {


    /**
     * 分页查询
     */
    IPage<${entity}DTO> queryListPage(${entity}DTO entityDTO, BasePageForm page);

    /**
     * 获取所有不分页
     */
    List<${entity}DTO> queryList(${entity}DTO entity);

    /**
     * 根据主键id获取单个对象
     */
    ${entity}DTO findOne(Long id);

    /**
     * 新增
     */
    ${entity}DTO create(${entity}DTO entity);


    /**
     * 更新
     */
    int update(${entity}DTO entity);

    /**
     * 删除
     */
    int delete(Long id);

     /**
     * 是否存在
     * existBy${entity}Id
     */
    boolean existBy${entity}Id(Long code);

    /**
    * 批量新增
    * create batch
    */
    Boolean insertBatch(List<${entity}DTO> dataList);


}
</#if>
